﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using PictureProcessing.Comm;

namespace PictureProcessing
{
    public partial class FromActivateCode : Form
    {
        public FromActivateCode()
        {
            InitializeComponent();
        }

        private void btnActivateCode_Click(object sender, EventArgs e)
        {
            string code = txtActivateCode.Text;
            if (string.IsNullOrEmpty(code))
            {
                MessageBox.Show("激活码不能为空!");
            }
            else 
            {
                if (CheckActivateCode.CheckCode2(code))
                {
                    CheckActivateCode.SaveCode(code);
                    MessageBox.Show("激活码验证成功!");
                    this.Close();
                }
                else 
                {
                    MessageBox.Show("激活码验证失败!");
                }
               

            }
        }

        private void btnGetActivateCode_Click(object sender, EventArgs e)
        {
            FromGetActivateCode fromgetcode = new FromGetActivateCode();
            fromgetcode.Show();
        }
    }
}
